﻿using System;
using System.Collections.Generic;
using System.Windows.Controls;
using NetBay.Core.BusinessEntities;

namespace Rio.Framework.Pages.Controls
{
    public partial class OCRConflictIndexControl : UserControl
    {
        public Index Index { private set; get; }
        public List<String> Values { private set; get; }

        public OCRConflictIndexControl(Index p_oIndex, List<String> p_oIndexValues)
        {
            InitializeComponent();
            Index = p_oIndex;
            Values = p_oIndexValues;
            LoadControls();
        }

        public void LoadControls()
        {
            IndexName.DataContext = Index;
            IndexValues.ItemsSource = Values;
            IndexValues.SelectedIndex = 0;
        }

        //public Dictionary<long, string> Index { private set; get; }
        //public List<String> Values { private set; get; }
        
        //public OCRConflictIndexControl(Dictionary<long,string> p_oIndex, List<String> p_oIndexValues)
        //{
        //    InitializeComponent();
        //    Index = p_oIndex;
        //    Values = p_oIndexValues;
        //    LoadControls();
        //}

        //public void LoadControls()
        //{
        //    IndexName.Text = Index.First().Value;
        //    IndexValues.ItemsSource = Values;
        //    IndexValues.SelectedIndex = 0;

        //}
    }
}
